Extract Substring Before or After Pattern in R (2 Examples) | Return Particular Characters of String